﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Reborn_Server.App1AppHandler;
using App1AppHandler;

namespace Reborn_Server.App1AppHandler 
{
    public class Spell_Taunt : TargetSpell
    {

        public void Cast(CreatureBase myCreatureBase, int CastLevel, long CreatureGUID)
        {
            List<MapItem> MapItemsWithin12;
            if (base.InitializeCast(myCreatureBase, CastLevel, CreatureGUID, false, out MapItemsWithin12) == false)
                return;

            int DamageAmount = SkillManager.AdjustForCombat(CastLevel, System.Convert.ToInt32(myCreatureBase.MaxHP / 2), CastingCreatureInt);
            DamageAmount = Math.Min(DamageAmount, TargetCreatureBase.MaxHP / 2);

            if (TargetCreatureBase is Creature)
            {
                TargetCreatureBase.hateManager.UpdateList(myCreatureBase, DamageAmount);
                myCreatureBase.SendMessage("You taunt " + TargetCreatureBase.Name + "!", "spelloffense");
            }
        }
    }
}
